﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;


class ValidRealNumberCheck
{
    static void Main(string[] args)
    {
        string[] numbers = { "0", "0.0", "0.5", "1.55", "1", "150", "-30",
                               "-1.55", "-0", "-0.0", "+5", "5.", "2-3","0 5","..25","5..5","5.5.5","1.5e7",".0","-.5",".5" };
        Regex realNumber = new Regex(@"\A(\-)?([0-9]|[1-9][0-9]+)(\.[0-9]+)?\Z");
        Regex zero=new Regex(@"\-0(\.0*)?");
        foreach (var number in numbers)
        {
            Console.Write("the number {0} is ", number);
            if(zero.IsMatch(number) || !realNumber.IsMatch(number))
            {
                Console.Write("in");
            }
            Console.WriteLine("valid real number!");
        }
    }
}
